package com.youlu.campus.base.community;

import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;

import java.io.Serializable;
import java.util.Date;

/**
 * 话题与用户统计信息基础类
 * @author: YangJ
 * @date: 2020/11/24 17:36
 */
@Data
public class TopicCountBase implements Serializable {

    @Id
    private String id;
    /**
     * 话题ID
     */
    @Indexed
    private String topicId;
    /**
     * 用户ID
     */
    @Indexed
    private String userId;
    /**
     * 是否投票
     */
    private Boolean voted;
    /**
     * 用户投票项 A B
     */
    private String selectValue;
    /**
     * 创建时间
     */
    @CreatedDate
    private Date createdTime;
    /**
     * 修改时间
     */
    private Date updatedTime;
}
